define(function(require,exports,module) {
    //广告轮播
    var oSilderImg = $('.js_silderImg');        //广告轮播框
    var oPagin = $('.js_pagin');                //个数点
    var indexSwiperAD = null;
    var resizeTimer = null;
    var oWindow = $(window);

    var htmlFontSize = $('html').css('font-size');
    var intSize = parseInt(htmlFontSize.split('p')[0]);
    var stretch = 24/26*intSize;
    Swiper_indexAD(stretch);

    // 页面尺寸修改
    oWindow.on('resize',function() {
        if (resizeTimer) {
            clearTimeout(resizeTimer)
        }
        resizeTimer = setTimeout(function(){
            htmlFontSize = $('html').css('font-size');
            intSize = parseInt(htmlFontSize.split('p')[0]);
            stretch = 24/26*intSize;
            Swiper_indexAD(stretch);
        }, 400);

    });

    function Swiper_indexAD(stretch) {

        if(indexSwiperAD !== null) {
            indexSwiperAD.destroy();
        }

        indexSwiperAD = oSilderImg.swiper({
            pagination: oPagin,
            loop: true,
            observer: true,
            observeParents: true,
            autoplay: 3000,
            autoplayDisableOnInteraction : false,
            effect : 'coverflow',
            slidesPerView: 1.1,
            centeredSlides: true,
            coverflow: {
                rotate: 0,
                stretch: -stretch,
                depth: 60,
                modifier: 2,
                slideShadows : true
            }
        });


    }


});